﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Systematize.Domain.Entities;

namespace Systematize.Domain.Services
{
    public interface ILibraryItemServiceAsync<T> : ILibraryItemService<T>, IEditableServiceAsync<T>
        where T : EditableEntity
    {
        Task<int> CountAsync();

        Task<int> CountAsync(Expression<Func<T, bool>> predicate);

        Task<T> GetByIdAsync(int id);

        Task<IEnumerable<T>> GetAllAsync();

        Task<T> FindAsync(Expression<Func<T, bool>> predicate);

        Task<IEnumerable<T>> FindAllAsync(Expression<Func<T, bool>> predicate);
    }
}
